package com.demo.example.proxy.cglib;

import org.springframework.cglib.proxy.CallbackFilter;

import java.lang.reflect.Method;

public class InterceptorFilter implements CallbackFilter {
    @Override
    public int accept(Method method) {
        if (method.isAnnotationPresent(LogProxy.class)) {
            return 0;
        } else if (method.isAnnotationPresent(CheckProxy.class)) {
            return 1;
        }
        return 2;
    }
}
